/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package batchjob;

/**
 *
 * @author jonesbr
 */
public class LifeInsurance extends Customer implements IMonthlyItem {
    private double billAmount;
    private String policyType;

    @Override
    public void process(String data) {
                // split the string into its constituent parts.
        String[] lifeInsuranceInfo = data.split(" ");
        setFirstName(lifeInsuranceInfo[0]);
        setLastName(lifeInsuranceInfo[1]);
        String strBillAmount = lifeInsuranceInfo[2];
        setBillAmount(Double.parseDouble(strBillAmount));
        setPolicyType(lifeInsuranceInfo[3]);
    }

    @Override
    public String toString() {
        return "Life Insurance " + getFirstName() + " " + getLastName() + " Bill Amount: " + getBillAmount();
    }

    /**
     * @return the billAmount
     */
    public double getBillAmount() {
        return billAmount;
    }

    /**
     * @param billAmount the billAmount to set
     */
    public void setBillAmount(double billAmount) {
        this.billAmount = billAmount;
    }

    /**
     * @return the policyType
     */
    public String getPolicyType() {
        return policyType;
    }

    /**
     * @param policyType the policyType to set
     */
    public void setPolicyType(String policyType) {
        this.policyType = policyType;
    }
    
    
    
    
}
